<template>
    <div class="box">
        <p>box</p>
        <button @click="changeColor">changeColor</button>
    </div>
</template>
<script setup>
import {ref} from 'vue';
const color = ref('red');
const bgColor = ref('green');
const changeColor = ()=>{
    color.value = 'green';
    bgColor.value = 'red';
}
</script>
<style>
.box{
    padding:20px;
    color:v-bind(color);
    background-color:v-bind(bgColor);
}
</style>